package net.oschina.app.cwq;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import net.oschina.app.Myapp;
import net.oschina.app.R;
import net.oschina.app.fragment.FindFragment;
import net.oschina.app.ui.LogOnActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Lenovo on 2017/07/16.
 */

public class FriendsCircleActivity extends Activity {
    @BindView(R.id.iv_fiends_return)
    ImageView ivFiendsReturn;
    @BindView(R.id.imageView)
    ImageView imageView;
    private boolean islogin = false;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.discover_friends_circle_view);
        ButterKnife.bind(this);
        islogin = Myapp.isLogIn;
    }


    @OnClick({R.id.iv_fiends_return, R.id.imageView})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_fiends_return:
                finish();
                break;
            case R.id.imageView:
                if (islogin){
                    Toast.makeText(this, "获取好友数据失败！", Toast.LENGTH_SHORT).show();
                }else {
                    Intent intent = new Intent(this, LogOnActivity.class);
                    startActivity(intent);
                }
                break;
        }
    }
}
